1. Field of the Invention
The present invention relates to a method for processing an image and a recording medium that stores the method. In particular, the invention relates to an image processing method that automatically places a plurality of image data items using the orientation of a principal object and its position in the image, as well as a recording medium that stores the method.
2. Description of the Related Art
As a method for using pictures, albums have conventionally been created by sticking pictures that are printed by developing film onto a mount.
In recent years, creation of albums on digital data becomes possible by digitizing images, so that users have become able to easily create albums while changing mount design or layout.
The creation of albums using digital data is easier and more flexible than the conventional method of sticking printed paper.
The creation of albums using digital data has become popular as digital cameras have become widespread, while the number of items of photographed image data has increased with increasing memory capacity.
As a result, this produces a new problem in that when users create albums using digital data, it takes much time to select images from a large number of images and place them.
To solve these problems, Japanese Patent Laid-Open No. 2006-287917 discloses a method for laying out images by specifying the orientations of objects (main objects), such as persons, in the images using the faces, bodies, the lines of sight, etc. and performs layout of the images on the basis of the specified orientations.
Japanese Patent Laid-Open No. 2006-304265 discloses a method for laying out images by calculating the directional components of images from their spatial frequency levels etc. and laying out the images on the basis of the calculated directional components.
Furthermore, Japanese Patent Laid-Open No. 2007-012030 discloses a method for laying out images by trimming the images and moving the positions of the objects so that the main objects in the images do not fall along the fold between pages and a method for placing images by determining whether a main object overlaps with another image in the album template and if they overlap, trimming the image and moving the position of the object.
As described in the related arts, although the methods for determining layout using the orientation of a main object are disclosed, some images have a plurality of principal objects.
The related arts do not show a method for determining the orientation in the case where a plurality of principal objects are present in an image, and there is also an image in which the orientation cannot be determined.
To perform balanced layout, it is necessary to consider not only the orientation of the principal object but also the location of the principal object. Although there is a technology for performing trimming depending on the orientation of the main object, there are many cases in which there is no enough area on the background of the principal object, so that the image cannot be trimmed at appropriate location of the principal object.
In laying out pictures on an album or the like, providing a space in the orientation of the principal object (including the direction of the line of sight) allows dynamic and wide reproduction.
Meanwhile, a viewer's point of view tends to be focused on the center of the layout mount of an album. Therefore, it is desirable to locate the principal object in the center as much as possible.
Accordingly, the principal object should be located at a desirable position of the final image layout in consideration of not only the orientation of the principal object but also the positional relationship of the principal object.